CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

set(boost_COMPONENTS system)
drd_find_packages(PREFIX pkgs AUTO)

LINK_DIRECTORIES ( lib )

# add_definitions( -DDGAL_NO_TBB )

FILE(GLOB_RECURSE cpp_files 				"util/*.cpp")
add_library(clip_sop SHARED 				${cpp_files})
target_link_libraries(clip_sop 				${pkgs_LIBRARIES} )

add_houdini_plugin(SOP_PlaneClip 			SOP_PlaneClip.cpp)
add_houdini_plugin(SOP_HullClip 			SOP_HullClip.cpp)
add_houdini_plugin(SOP_VoronoiFracture 		SOP_VoronoiFracture.cpp)
add_houdini_plugin(SOP_CleanMesh 			SOP_CleanMesh.cpp)
add_houdini_plugin(SOP_VoroUVProject 		SOP_VoroUVProject.cpp)
add_houdini_plugin(SOP_AddEdges 			SOP_AddEdges.cpp)

target_link_libraries(SOP_PlaneClip 		${pkgs_LIBRARIES} clip_sop)
target_link_libraries(SOP_HullClip 			${pkgs_LIBRARIES} clip_sop)
target_link_libraries(SOP_VoronoiFracture 	${pkgs_LIBRARIES} clip_sop)
target_link_libraries(SOP_CleanMesh 		${pkgs_LIBRARIES} clip_sop)
target_link_libraries(SOP_VoroUVProject 	${pkgs_LIBRARIES} clip_sop)
target_link_libraries(SOP_AddEdges 			${pkgs_LIBRARIES} clip_sop)

install(
	TARGETS
	clip_sop
	DESTINATION lib
)

install(
	TARGETS
	SOP_PlaneClip
	SOP_HullClip
	SOP_CleanMesh
	SOP_VoronoiFracture
	SOP_VoroUVProject
	SOP_AddEdges
	DESTINATION houdini/dso
)






/***
    Copyright 2008-2012 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios)

    This file is part of anim-studio-tools.

    anim-studio-tools is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    anim-studio-tools is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with anim-studio-tools.  If not, see <http://www.gnu.org/licenses/>.
***/
